const navigation = resolve => require(['../components/widgets/spread-navigation.vue'], resolve);
const breadcrumb = resolve => require(['../components/widgets/breadcrumb.vue'], resolve);

const routes = [

    {
        name: 'Organize',
        path: '/organize/',
        redirect: {
            name: 'OrganizeRoleAdds'
        },
        meta: {
            title: '组织管理',
            menu: {
                name: '组织管理',
                parent: '',
                icon: 'el-icon-user-solid',
                image: ''
            }
        }
    },
    {
        name: 'OrganizeRoleAdds',
        path: '/organize/role-adds',
        meta: {
            title: '角色添加',
            menu: {
                name: '角色添加',
                parent: 'Organize',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/organize/role-adds.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    }, {
        name: 'OrganizeRoleEdit',
        path: '/organize/role-edit',
        meta: {
            title: '角色编辑',
            menu: {
                name: '角色编辑',
                parent: 'Organize',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/organize/role-edit.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OrganizeRoleList',
        path: '/organize/role-list',
        meta: {
            title: '角色列表',
            menu: {
                name: '角色列表',
                parent: 'Organize',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/organize/role-list.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OrderForm',
        path: '/order-form/',
        redirect: {
            name: 'OrderFormList'
        },
        meta: {
            title: '订单管理',
            menu: {
                name: '订单管理',
                parent: '',
                icon: 'el-icon-document-remove',
                image: ''
            }
        }
    },
    {
        name: 'OrderFormByStore',
        path: '/order-form/store-index',
        meta: {
            title: '门店订单',
            menu: {
                name: '门店订单',
                parent: 'OrderForm',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/order-form/store-index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OrderFormByBusiness',
        path: '/order-form/business-index',
        meta: {
            title: '业务订单',
            menu: {
                name: '业务订单',
                parent: 'OrderForm',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/order-form/business-index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    // {
    //     name: 'OrderFormByTemporaryStorage',
    //     path: '/order-form/temporary-storage-index',
    //     meta: {
    //         title: '暂存点订单',
    //         menu: {
    //             name: '暂存点订单',
    //             parent: 'OrderForm',
    //             icon: '',
    //             image: ''
    //         }
    //     },
    //     components: {
    //         default: resolve => require(['../views/order-form/temporary-storage-index.vue'], resolve),
    //         navigation: navigation, breadcrumb: breadcrumb
    //     }
    // },
    // {
    //     name: 'OrderFormByPlatform',
    //     path: '/order-form/platform-index',
    //     meta: {
    //         title: '业务主管订单',
    //         menu: {
    //             name: '业务主管订单',
    //             parent: 'OrderForm',
    //             icon: '',
    //             image: ''
    //         }
    //     },
    //     components: {
    //         default: resolve => require(['../views/order-form/platform-index.vue'], resolve),
    //         navigation: navigation, breadcrumb: breadcrumb
    //     }
    // },
    {
        name: 'StockManage',
        path: '/stock-manage/',
        redirect: {
            name: 'StockManageByPallet'
        },
        meta: {
            title: '库存管理',
            menu: {
                name: '库存管理',
                parent: '',
                icon: 'el-icon-office-building',
                image: ''
            }
        }
    },
    {
        name: 'StockManageByPallet',
        path: '/stock-manage/pallet-index',
        meta: {
            title: '托盘状态',
            menu: {
                name: '托盘状态',
                parent: 'StockManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/pallet-index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },

    {
        name: 'StockManageByList',
        path: '/stock-manage/tray-manage',
        meta: {
            title: '托盘管理',
            menu: {
                name: '托盘管理',
                parent: 'StockManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/tray-manage.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'StockManageByEnter',
        path: '/stock-manage/enter-index',
        meta: {
            title: '入库订单',
            menu: {
                name: '入库订单',
                parent: 'StockManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/enter-index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'StockManageByOut',
        path: '/stock-manage/out-index',
        meta: {
            title: '出库订单',
            menu: {
                name: '出库订单',
                parent: 'StockManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/out-index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'StockManageKucun',
        path: '/stock-manage/kucun-index',
        meta: {
            title: '库存报表',
            menu: {
                name: '库存报表',
                parent: 'StockManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/kucun.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    //客户管理

    {
        name: 'CustomerManage',
        path: '/customer-manage/',
        redirect: {
            name: 'CustomerManageIndex'
        },
        meta: {
            title: '客户管理',
            menu: {
                name: '客户管理',
                parent: '',
                icon: 'el-icon-office-building',
                image: ''
            }
        }
    },
    {
        name: 'CustomerManageIndex',
        path: '/customer-manage/index',
        meta: {
            title: '客户管理',
            menu: {
                name: '客户管理',
                parent: 'CustomerManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/customer-anage/index.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'CustomerYeji',
        path: '/customer-manage/yeji',
        meta: {
            title: '客户业绩',
            menu: {
                name: '客户业绩',
                parent: 'CustomerManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/customer-anage/yeji.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'YejiDetail',
        path: '/customer-anage/yeji-detail',
        meta: {
            isNotPermission: true,
            title: '业绩详情',
            menu: {
                name: '业绩详情',
                parent: 'CustomerManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/customer-anage/yeji-detail.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    //报价管理
    {
        name: 'QuotedPrice',
        path: '/quoted-price/',
        redirect: {
            name: 'QuotedPriceAdds'
        },
        meta: {
            title: '报价管理',
            menu: {
                name: '报价管理',
                parent: '',
                icon: 'el-icon-money',
                image: ''
            }
        }
    },
    {
        name: 'QuotedPriceEdits',
        path: '/quoted-price/edits',
        meta: {
            isNotPermission: true,
            title: '报价管理',
            menu: {
                name: '报价管理',
                parent: 'QuotedPrice',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/quoted-price/edits.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'QuotedPriceLists',
        path: '/quoted-list/list',
        meta: {
            title: '报价列表',
            menu: {
                name: '报价列表',
                parent: 'QuotedPrice',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/quoted-price/quoted-list.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    }, {
        name: 'QuotedPriceAdd',
        path: '/quoted-list/add',
        meta: {
            isNotPermission: true,
            title: '报价列表',
            menu: {
                name: '添加报价',
                parent: 'QuotedPrice',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/quoted-price/quoted-add.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'QuotedPriceAdds',
        path: '/quoted-price/adds',
        meta: {
            title: '分类添加',
            menu: {
                name: '分类添加',
                parent: 'QuotedPrice',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/quoted-price/adds.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OtherSetting',
        path: '/other-setting/',
        meta: {
            title: '其它设置',
            menu: {
                name: '其它设置',
                parent: '',
                icon: 'el-icon-setting',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/organize/role-adds.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OtherSettingNotice',
        path: '/other-setting/notice',
        meta: {
            title: '公告管理',
            menu: {
                name: '公告管理',
                parent: 'OtherSetting',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/other-setting/notice.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'OtherSettingOptions',
        path: '/other-setting/options',
        meta: {
            title: '系统设置',
            menu: {
                name: '系统设置',
                parent: 'OtherSetting',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/other-setting/options.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },
    {
        name: 'CashManage',
        path: '/cash/',
        redirect: {
            name: 'CashList'
        },
        meta: {
            title: '提现管理',
            menu: {
                name: '提现管理',
                parent: '',
                icon: 'el-icon-user-solid',
                image: ''
            }
        }
    },
    {
        name: 'CashList',
        path: '/cash/cash-list',
        meta: {
            title: '提现列表',
            menu: {
                name: '提现列表',
                parent: 'CashManage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/cash-manage/cash-list.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    },



    {
        name:'Details',
        path:'/stock-manage/details',
        meta: {
            title: '订单详情',
            menu: {
                name: '订单详情',
                parent: 'stock-manage',
                icon: '',
                image: ''
            }
        },
        components: {
            default: resolve => require(['../views/stock-manage/details.vue'], resolve),
            navigation: navigation, breadcrumb: breadcrumb
        }
    }

];

export default routes;
